home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / lynx-2.4 / utils / inews / config.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-28  |  13.1 KB  |  393 lines

  1.  
  2. /**************************** NN CONFIGURATION ***************************
  3.  *
  4.  *      Configuration file for nn.
  5.  *
  6.  *      You must edit this file to reflect your local configuration
  7.  *      and environment.
  8.  *
  9.  *      Before editing this file, read the licence terms in the README
  10.  *      file and the installation guidelines in the INSTALLATION file.
  11.  *
  12.  *      (c) Copyright 1990, Kim F. Storm.  All rights reserved.
  13.  */
  14.  
  15. #define RELEASE         "6.4"
  16.  
  17. #include <stdio.h>
  18. #include <ctype.h>
  19.  
  20.  
  21. /*********************** NETWORK DEPENDENT DEFINITIONS **********************
  22.  *
  23.  *      Define NETWORK_DATABASE if you share the database through NFS on
  24.  *      a network with different, non-compatible machines, e.g. SUNs and
  25.  *      VAXen, or SUN-3 and SUN-4, or if you are using different compilers
  26.  *      on the same architecture.
  27.  *
  28.  *      In a homogenous network, you can leave it undefined for higher
  29.  *      performance (no data conversion is needed).
  30.  */
  31.  
  32. /* #define NETWORK_DATABASE     /* */
  33.  
  34.  
  35. /********************************** NNTP *********************************
  36.  *
  37.  *      Define NNTP to enable nntp support.  If you are not using NNTP,
  38.  *      just leave the following NNTP_* definitions as they are - they
  39.  *      will be ignored anyway.
  40.  *
  41.  *      With NNTP, the nnmaster still maintains a local database of
  42.  *      all article headers for fast access (and because NNTP does not
  43.  *      support nn - yet), while the articles are fetched from the
  44.  *      nntp server when they are read or saved.
  45.  *
  46.  *      You may still share this database through NFS locally (see the
  47.  *      description of NETWORK_DATABASE above) if you don't want to
  48.  *      have separate nn databases on all your local systems.
  49.  *
  50.  *      Consult the file NNTP for further information on the use of NNTP.
  51.  */
  52.  
  53. /* #define NNTP                 /* */
  54.  
  55. /*
  56.  *      Define NNTP_SERVER to the name of a file containing the name of the
  57.  *      nntp server.
  58.  *
  59.  *      It is vital that both the nnmaster and all nn users on a machine
  60.  *      uses the same nntp server, because the nn database is synchronized
  61.  *      with a specific news active file.
  62.  *
  63.  *      If the file name does not start with a slash, it is relative to
  64.  *      LIB_DIRECTORY defined below.
  65.  *      NOTE: If you plan to use the included inews, it MUST be a full pathname
  66.  */
  67.  
  68. #define NNTP_SERVER     "/usr/lib/nntp_server"
  69.  
  70. /*
  71.  *      Define NNTP_POST if you want nn to reject attempts to post via
  72.  *      NNTP to a server, that disallows postings.
  73.  *
  74.  *      You should define this, if you use the NNTP based mini-inews for
  75.  *      postings from NNTP clients.  If you use another mechanism, that
  76.  *      does not involve NNTP, you should leave it undefined.
  77.  */
  78.  
  79. #define NNTP_POST             /* */
  80.  
  81. /*
  82.  *      NNTP's mini-inews seems to require that messages contain a complete
  83.  *      header with Message-ID, Path, and Date fields which the normal inews
  84.  *      generates itself.  If your mini-inews requires these headers to
  85.  *      be present, define NNTP_MINI_INEWS_HEADER below.
  86.  */
  87.  
  88. #define NNTP_MINI_INEWS_HEADER  /* uses "broken" mini-inews */
  89.  
  90. /*
  91.  *      Define NNTP_PATH_HOSTNAME to force a specific hostname into the
  92.  *      Path: header generated when NNTP_MINI_INEWS_HEADER is defined.
  93.  *      This is useful for multi-machine sites with one mail/news gateway.
  94.  *
  95.  *      If the string starts with a '/' it is taken as the name of a file
  96.  *      from which the outgoing hostname should be read (at runtime).
  97.  */
  98.  
  99. /* #define NNTP_PATH_HOSTNAME   "puthostnamehere"       /* */
  100.  
  101.  
  102. /***************** OPERATING SYSTEM DEPENDENT DEFINITIONS *******************
  103.  *
  104.  *      Include the appropriate s- file for your system below.
  105.  *
  106.  *      If a file does not exist for your system, you can use
  107.  *      conf/s-template.h as a starting point for writing you own.
  108.  */
  109.  
  110. #include "s-sys5.h"
  111.  
  112. /*
  113.  *      Define DEFAULT_PAGER as the initial value of the 'pager' variable.
  114.  *      nnadmin pipes shell command output though this command.
  115.  */
  116.  
  117. #define DEFAULT_PAGER           "pg -n -s"      /* system V */
  118. /* #define DEFAULT_PAGER        "more"                  /* bsd */
  119.  
  120. /*
  121.  *      DEFAULT_PRINTER is the initial value of the 'printer' variable.
  122.  *      nn's :print command pipes text into this command.
  123.  */
  124.  
  125. #define DEFAULT_PRINTER         "lp -s"         /* System V */
  126. /* #define DEFAULT_PRINTER      "lpr -p -JNEWS" /* bsd */
  127.  
  128. /*
  129.  *      Define RESIZING to make nn understand dynamic window-resizing.
  130.  *      (It uses the TIOCGWINSZ ioctl found on most 4.3BSD systems)
  131.  */
  132.  
  133. /* #define RESIZING             /* */
  134.  
  135.  
  136. /********************** MACHINE DEPENDENT DEFINITIONS **********************
  137.  *
  138.  *      Include the appropriate m- file for your system below.
  139.  *
  140.  *      If a file does not exist for your system, you can use
  141.  *      conf/m-template.h as a starting point for writing you own.
  142.  */
  143.  
  144. #include "m-m680x0.h"
  145.  
  146.  
  147. /***************************** OWNERSHIP ***************************
  148.  *
  149.  *      Specify owner and group for installed files and programs.
  150.  *
  151.  *      The nnmaster will run suid/sgid to this owner and group.
  152.  *
  153.  *      The only requirements are that the ownership allows the
  154.  *      nnmaster to READ the news related files and directories, and
  155.  *      the ordinary users to read the database and execute the nn*
  156.  *      programs.
  157.  *
  158.  *      Common choices are:  (news, news)  and   (your uid, your gid)
  159.  */
  160.  
  161. #define OWNER   "news"
  162. #define GROUP   "news"
  163.  
  164.  
  165. /**************************** LOCALIZATION ****************************
  166.  *
  167.  *      Specify where programs and files are installed.
  168.  *
  169.  *      BIN_DIRECTORY    - the location of the user programs (mandatory)
  170.  *
  171.  *      LIB_DIRECTORY    - the location of auxiliary programs and files.
  172.  *                         (mandatory UNLESS ALL of the following are defined).
  173.  *
  174.  *      MASTER_DIRECTORY - the location of the master program (on server)
  175.  *                         (= LIB_DIRECTORY if undefined)
  176.  *
  177.  *      CLIENT_DIRECTORY - the location of auxiliary programs (on clients)
  178.  *                         (= LIB_DIRECTORY if undefined)
  179.  *
  180.  *      HELP_DIRECTORY   - the location of help files, online manual, etc.
  181.  *                         (= CLIENT_DIRECTORY/help if undefined)
  182.  *
  183.  *      CACHE_DIRECTORY  - if NNTP is used, nn uses this central directory
  184.  *                         to store working copies of articles on the local
  185.  *                         system.  If not defined, it stores the articles
  186.  *                         in each user's ~/.nn directory.
  187.  *
  188.  *      TMP_DIRECTORY    - temporary file storage.  Overriden by $TMPDIR.
  189.  *                         (= /usr/tmp if undefined).
  190.  *
  191.  *      LOG_FILE         - the location of nn's log file.
  192.  *                         (= LIB_DIRECTORY/Log if undefined).
  193.  */
  194.  
  195. #define BIN_DIRECTORY   "/usr/local/bin"
  196. #define LIB_DIRECTORY   "/usr/local/lib/nn"
  197.  
  198.  
  199. /**************************** DATABASE LOCATION **************************
  200.  *
  201.  *      Specify where the nn database should be installed.
  202.  *
  203.  *      If none of the following symbols are defined, the database will
  204.  *      be contained in the NEWS_DIRECTORY in a separate .nn directory for
  205.  *      master files and in files named .nnx and .nnd in each group's
  206.  *      spool directory.  To use this scheme, the OWNER specified above
  207.  *      must have write permission on the news spool directories.
  208.  *
  209.  *      If you access news via NNTP, you will probably always have to
  210.  *      give the database directory explicitly through DB_DIRECTORY
  211.  *      (and DB_DATA_DIRECTORY), since the normal news spool directories
  212.  *      are probably not available on the local system.
  213.  *      The exception may be if nnmaster runs directly on the nntp server.
  214.  *
  215.  *      To change the default behaviour, you can define the following
  216.  *      symbols:
  217.  *
  218.  *      DB_DIRECTORY       - the directory containing the master files.
  219.  *
  220.  *      DB_DATA_DIRECTORY  - the directory containing the per-group files
  221.  *                           (default is DB_DIRECTORY/DATA if undefined).
  222.  *
  223.  *      DB_LONG_NAMES      - use group's name rather than number when
  224.  *                           building file names in DB_DATA_DIRECTORY.
  225.  *           (The file system must support long file names!!)
  226.  */
  227.  
  228. #define DB_DIRECTORY    "/usr/spool/nn"
  229.  
  230.  
  231. /*************************** NEWS TRANSPORT **************************
  232.  *
  233.  *      Specify the location of your news programs and files
  234.  *      You only need to specify these if you are not
  235.  *      satisfied with the default settings.
  236.  *
  237.  *      NEWS_DIRECTORY          - The news spool directory.
  238.  *                                Default: /usr/spool/news
  239.  *
  240.  *      NEWS_LIB_DIRECTORY      - The news lib directory.
  241.  *                                Default: /usr/lib/news
  242.  *
  243.  *      INEWS_PATH              - The location of the inews program.
  244.  *                                Default: NEWS_LIB_DIR/inews
  245.  *
  246.  *      RMGROUP_PATH            - The location of the rmgroup program.
  247.  *                                Default: NEWS_LIB_DIR/{rm,del}group
  248.  */
  249.  
  250. #define NEWS_DIRECTORY          "/usr/spool/news"       /* */
  251. #define NEWS_LIB_DIRECTORY      "/usr/lib/news"         /* */
  252.  
  253. /* #define INEWS_PATH           "/usr/lib/news/inews"   /* */
  254.  
  255.  
  256. /*************************** MAIL INTERFACE *************************
  257.  *
  258.  *      Specify a mailer that accepts a letter WITH a header IN THE TEXT.
  259.  *
  260.  *      A program named 'recmail' program is normally delivered with
  261.  *      the Bnews system, or you can use sendmail -t if you have it.
  262.  *
  263.  *      The contrib/ directory contains two programs which you might
  264.  *      be able to use with a little tweaking.
  265.  */
  266.  
  267. #define REC_MAIL        "/usr/lib/news/recmail" /* non-sendmail */
  268. /* #define REC_MAIL     "/usr/lib/sendmail -t"  /* sendmail */
  269.  
  270.  
  271. /*
  272.  *      Define HAVE_ROUTING if your mailer understands domain based
  273.  *      adresses (...@...) and performs the necessary rerouting (e.g.
  274.  *      Sendmail or Smail).
  275.  *
  276.  *      Otherwise, nn will provide a simple routing facility using
  277.  *      routing information specified in the file LIB_DIRECTORY/routes.
  278.  */
  279.  
  280. #define HAVE_ROUTING                    /* */
  281.  
  282. /*
  283.  *      If HAVE_ROUTING is NOT defined, nn needs to know the name of
  284.  *      your host.  To obtain the host name it will use either of the
  285.  *      'uname' or 'gethostname' system calls as specified in the s-
  286.  *      file included above.
  287.  *
  288.  *      If neither 'uname' nor 'gethostname' is available, you must
  289.  *      define HOSTNAME to be the name of your host.  Otherwise, leave
  290.  *      it undefined (it will not be used anyway).
  291.  */
  292.  
  293. /* #define HOSTNAME     "myhost"        /* Not used if HAVE_ROUTING */
  294.  
  295. /*
  296.  *      Define APPEND_SIGNATURE if you want nn to ask users to append
  297.  *      ~/.signature to mail messages (reply/forward/mail).
  298.  *
  299.  *      If the mailer defined in REC_MAIL automatically includes .signature
  300.  *      you should not define this (it will fool people to include it twice).
  301.  *
  302.  *      I think 'recmail' includes .signature, but 'sendmail -t' doesn't.
  303.  */
  304.  
  305. /* #define APPEND_SIGNATURE             /* */
  306.  
  307. /*
  308.  *      BUG_REPORT_ADDRESS is the initial value of the bug-report-address
  309.  *      variable which is used by the :bug command to report bugs in
  310.  *      the nn software.
  311.  */
  312.  
  313. #define BUG_REPORT_ADDRESS      "nn-bugs@dkuug.dk"
  314.  
  315.  
  316. /*************************** DOCUMENTATION ***************************
  317.  *
  318.  *      Specify directories for the user and system manuals
  319.  *
  320.  *      Adapt this to your local standards; the manuals will be named
  321.  *              $(MAN_DIR)/program.$(MAN_SECTION)
  322.  *
  323.  *      USER_MAN        - nn, nntidy, nngrep, etc.
  324.  *      SYS_MAN         - nnadmin
  325.  *      DAEMON_MAN      - nnmaster
  326.  */
  327.  
  328. #define USER_MAN_DIR    "/usr/man/man1"
  329. #define USER_MAN_SECTION        "1"
  330.  
  331. #define SYS_MAN_DIR     "/usr/man/man1"
  332. #define SYS_MAN_SECTION         "1m"
  333.  
  334. #define DAEMON_MAN_DIR  "/usr/man/man8"
  335. #define DAEMON_MAN_SECTION      "8"
  336.  
  337.  
  338. /************************** LOCAL POLICY *****************************
  339.  *
  340.  *      Define STATISTICS if you want to keep a record of how much
  341.  *      time the users spend on news reading.
  342.  *
  343.  *      Sessions shorter than the specified number of minutes are not
  344.  *      recorded (don't clutter up the log file).
  345.  *
  346.  *      Usage statistics is entered into the $LOG_FILE with code U
  347.  */
  348.  
  349. /* #define STATISTICS   5 /* minutes */
  350.  
  351. /*
  352.  *      Define ACCOUNTING if you want to keep accumulated accounting
  353.  *      based on the statistics in a separate 'acct' file.  In this
  354.  *      case, the accounting figures will be secret, and not be
  355.  *      written to the Log file.  And the users will not be able to
  356.  *      "decrease" their own account.
  357.  *
  358.  *      See account.c for optional cost calculation parameters.
  359.  */
  360.  
  361. /* #define ACCOUNTING           /* */
  362.  
  363. /*
  364.  *      Define AUTHORIZE if you want to restrict the use of nn to
  365.  *      certain users or certain periods of the day.  Define both
  366.  *      this and ACCOUNTING if you want to impose a usage quota
  367.  *
  368.  *      See account.c for implementing various access policies.
  369.  */
  370.  
  371. /* #define AUTHORIZE    /* */
  372.  
  373. /*
  374.  *      Default folder directory
  375.  */
  376.  
  377. #define FOLDER_DIRECTORY        "~/News"
  378.  
  379. /*
  380.  *      Max length of authors name (in "edited" format).
  381.  *      Also size of "Name" field on the article menus.
  382.  *      You may want to increase this if your terminals are wider than
  383.  *      80 columns.
  384.  */
  385.  
  386. #define NAME_LENGTH             16
  387.  
  388.  
  389. /************************ CONFIGURATION COMPLETED ************************/
  390.  
  391. #include "global.h"
  392.  
  393.